package com.soda.service.impl;

import java.util.List;

import com.soda.bean.Student;
import com.soda.dao.StudentDao;
import com.soda.dao.impl.StudentDaoImpl;
import com.soda.service.StudentService;
import com.soda.util.PageInfo;
import com.soda.util.SelectStudentCondition;



public class StudentServiceImpl implements StudentService{

	public Student selectstuNameByLoginNamePwd(String name, String pwd) {
		StudentDao sd=new StudentDaoImpl();
		return sd.selectstuNameByLoginNamePwd(name, pwd) ;
	}

	public int selectajaxName(String name) {
		StudentDao sd=new StudentDaoImpl();
		
		return sd.selectajaxName(name);
	}

	public int addRegistStuMessage(Student s) {
		StudentDao sd=new StudentDaoImpl();

		return sd.addRegistStuMessage(s);
	}

	public Student selectStumessage(int stuid) {
		StudentDao sd=new StudentDaoImpl();
		return sd.selectStumessage(stuid);
	}

	public int chongzhiMoney(Student student, int money) {
		StudentDao sd=new StudentDaoImpl();
		
		return sd.chongzhiMoney(student, money);
	}

	public Student selectMoneyChongZhiHou(int id) {
		StudentDao sd=new StudentDaoImpl();
		return sd.selectMoneyChongZhiHou(id);
	}

	public int updatePwd(int stuid, String newpwd) {
		StudentDao sd=new StudentDaoImpl();
		return sd.updatePwd(stuid, newpwd);
	}

	public int updateMessage(int stuid, Student s) {
		StudentDao sd=new StudentDaoImpl();
		return sd.updateMessage(stuid, s);
	}

	public List<Student> selectAllStuForHouTai(PageInfo pi) {
		StudentDao sd=new StudentDaoImpl();
		return sd.selectAllStuForHouTai(pi);
	}

	public int queryTotal() {
		StudentDao sd=new StudentDaoImpl();
		return sd.queryTotal();
	}

	public List<Student> selectStuByCondi(PageInfo pi,SelectStudentCondition ssc) {
		StudentDao sd=new StudentDaoImpl();

		return sd.selectStuByCondi( pi,ssc);
	}

	public int queryConTotal(SelectStudentCondition ssc) {
		StudentDao sd=new StudentDaoImpl();
		return sd.queryConTotal( ssc);
	}

	public Student selectStuById(int stuid) {
		StudentDao sd=new StudentDaoImpl();
		return sd.selectStuById(stuid);
	}

	public int updateHoutaiStu(int stuid, Student s) {
		StudentDao sd=new StudentDaoImpl();
		return sd.updateHoutaiStu( stuid,  s);
	}

	public int deleteStu(int stuid) {
		StudentDao sd=new StudentDaoImpl();
		return sd.deleteStu(stuid);
	}



}
